import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'

import 映射 from './映射'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: 映射,
})

router.beforeEach((to, from, next) => {
  if (to.meta.title) {
    document.title = to.meta.title as string
  }
  next()
})

export default router
